package gui_classes;

import java.awt.*;

import javax.swing.*;

import domain.*;

/**
 * This is the base class for all the panels in this portal. It stores the previous panel,
 * displays the previous panel, and displays this panel.
 * @author SCIUUG Faults
 *
 */

public abstract class DERPBase extends JPanel {
	private DERPBase previous;


	/**
	 * Getter for previous panel
	 * @return previous
	 */
	public DERPBase getPrevious()
	{
		return this.previous;
	}
	
	/**
	 * Setter for previous panel
	 * @param prev
	 */
	public void setPrevious(DERPBase prev)
	{
		this.previous = prev;
	}
	
	/**
	 * Displays the previous panel
	 */
	public void displayPrev()
	{
		this.previous.display();
	}
	
	/**
	 * Displays this panel
	 */
	public abstract void display();
	
}
